import request from "@/utils/request";
//全部渠道
export const getAllChannel = params => request({
	url: '/api/channel/getAllChannel',
	params
})
//数据字典
export const getDictList = params => request({
	url: '/api/dict/getDictList',
	params
})



//积分记录
export const getScoreList = params => request({
	url: '/admin-api/member/point/record/page',
	params
})

//分类--内容--列表 0: 食物 1: 行为 2: 疾病 3：动态
export const cateList = params => request({
	url: '/admin-api/system/category/page',
	method: 'post',
	data: params

})
//分类--内容--添加
export const cateAdd = data => request({
	url: '/admin-api/system/category/create',
	method: 'post',
	data

})
//分类--内容--修改
export const cateSave = data => request({
	url: '/admin-api/system/category/update',
	method: 'post',
	data

})
//分类--内容--删除
export const cateDel = params => request({
	url: '/admin-api/system/category/delete',
	params

})


//什么能做--内容--列表
export const behaviorList = data => request({
	url: '/admin-api/system/behavior/page',
	method: 'post',
	data

})
//什么能做--内容--添加
export const behaviorAdd = data => request({
	url: '/admin-api/system/behavior/create',
	method: 'post',
	data

})
//什么能做--内容--修改
export const behaviorSave = data => request({
	url: '/admin-api/system/behavior/update',
	method: 'post',
	data

})
//什么能做--内容--删除
export const behaviorDel = params => request({
	url: '/admin-api/system/behavior/delete',
	method: 'get',
	params

})



//什么能吃--内容--列表
export const foodList = data => request({
	url: '/admin-api/system/food/page',
	method: 'post',
	data

})
//什么能吃--内容--添加
export const foodAdd = data => request({
	url: '/admin-api/system/food/create',
	method: 'post',
	data

})
//什么能吃--内容--修改
export const foodSave = data => request({
	url: '/admin-api/system/food/update',
	method: 'post',
	data

})
//什么能吃--内容--删除
export const foodDel = params => request({
	url: '/admin-api/system/food/delete',
	params

})
//根据平台类型获得平台信息
export const platformInfo = data => request({
	url: '/admin-api/system/platform/get/type',
	method: 'post',
	data

})
//新增平台信息
export const platformCreate = data => request({
	url: '/admin-api/system/platform/create',
	method: 'POST',
	data: data

})
//新增平台信息
export const platformUpdate = data => request({
	url: '/admin-api/system/platform/update',
	method: 'put',
	data

})
//意见反馈
export const optionPage = params => request({
	url: '/admin-api/system/option/page',
	method: 'get',
	params

})
//常见问题/admin-api/system/issues/page
export const issuespage = params => request({
	url: '/admin-api/system/issues/page',
	method: 'get',
	params

})
//常见问题修改/admin-api/system/issues/page
export const issuesupdate = data => request({
	url: '/admin-api/system/issues/update',
	method: 'put',
	data

})
//常见问题刪除/admin-api/system/issues/page
export const issuesdelete = params => request({
	url: '/admin-api/system/issues/delete',
	method: 'DELETE',
	params

})
//常见问新增/admin-api/system/issues/page
export const issuescreate = data => request({
	url: '/admin-api/system/issues/create',
	method: 'post',
	data

})
//字典
export const dictDataget = params => request({
	url: '/admin-api/system/dict-data/get',
	method: 'get',
	params

})

//消息列表/admin-api/system/notify-message/page
export const notifyPage = params => request({
	url: '/admin-api/system/notify-message/page',
	method: 'get',
	params

})
//消息列表删除/admin-api/system/notify-message/page
export const notifydelete = params => request({
	url: '/admin-api/system/notify-message/delete',
	method: 'delete',
	params

})
//消息新增/admin-api/system/notify-message/page
export const notifycreate = params => request({
	url: '/admin-api/system/notify-message/create',
	method: 'post',
	params

})
//宠物列表
export const petsPage = params => request({
	url: '/admin-api/system/pets/page',
	method: 'get',
	params

})
//宠物分类
export const simpleQuery = data => request({
	url: '/admin-api/system/pet/category/page',
	method: 'post',
	data

})
//动态内容
export const contentpage = data => request({
	url: '/admin-api/member/content/page',
	method: 'post',
	data

})
//动态内容删除/admin-api/member/content/delete
export const contentdelete = params => request({
	url: '/admin-api/member/content/delete',
	method: 'delete',
	params

})
//评论列表
export const commentpage = params => request({
	url: '/admin-api/product/comment/page',
	method: 'get',
	params

})

//支付订单列表/admin-api/pay/order/page
export const orderpage = params => request({
	url: '/admin-api/pay/order/page',
	method: 'get',
	params

})
//医生列表/admin-api/member/doctor/page
export const doctorpage = data => request({
	url: '/admin-api/member/doctor/page',
	method: 'post',
	data

})
//医生审核列表/admin-api/member/doctor/page
export const approvepage = data => request({
	url: '/admin-api/member/doctor/approve/page',
	method: 'post',
	data

})
//修改医生信息
export const doctorupdate = data => request({
	url: '/admin-api/member/doctor/update',
	method: 'put',
	data

})
//新增医生医生信息
export const doctorcreate = data => request({
	url: '/admin-api/member/doctor/create',
	method: 'post',
	data

})

//医生详情/admin-api/member/doctor/detail
export const doctordetail = params => request({
	url: '/admin-api/member/doctor/detail',
	method: 'get',
	params

})
//会员列表/admin-api/member/user/page
export const userpage = params => request({
	url: '/admin-api/member/user/page',
	method: 'get',
	params

})

//订单趋势
export const orderCountTrend = params => request({
	url: '/admin-api/statistics/trade/order-count-trend',
	method: 'get',
	params

})

//统计/admin-api/statistics/admin/summary
export const adminsummary = params => request({
	url: '/admin-api/statistics/admin/summary',
	method: 'get',
	params

})
//秒杀
export const seckillpage = params => request({
	url: '/admin-api/promotion/seckill-activity/page',
	method: 'get',
	params

})
export const seckillDelete = params =>
	request({
		//删除秒杀活动
		url: '/admin-api/promotion/seckill-activity/delete',
		method: 'DELETE',
		params
	})
export const dictData = params =>
	request({
		url: '/admin-api/system/dict-data/get',
		method: 'get',
		params
	})

//admin-api/system/pets/get
export const petsget = params =>
	request({
		url: '/admin-api/system/pets/get',
		method: 'get',
		params
	})


//获得疾病分页
export const diseasePage = params =>
	request({
		url: '/admin-api/system/disease/page',
		method: 'post',
		data: params
	})

//创建疾病
export const diseaseCreate = params =>
	request({
		url: '/admin-api/system/disease/create',
		method: 'post',
		data: params
	})

//更新疾病
export const diseaseUpdate = params =>
	request({
		url: '/admin-api/system/disease/update',
		method: 'post',
		data: params
	})

//删除疾病
export const diseaseDelete = params =>
	request({
		url: '/admin-api/system/disease/delete',
		method: 'get',
		params
	})

//商家回复/admin-api/product/comment/reply
export const commentreply = params =>
	request({
		url: '/admin-api/product/comment/reply',
		method: 'put',
		data: params
	})

export const commentvisible = params =>
	request({
		url: '/admin-api/product/comment/update-visible',
		method: 'put',
		data: params
	})
export const seckillPage = params =>
	request({
		url: '/admin-api/promotion/seckill-config/page',
		method: 'get',
		params: params
	})
export const seckillCreate = params =>
	request({
		url: '/admin-api/promotion/seckill-config/create',
		method: 'post',
		data: params
	})
export const seckillUpdate = params =>
	request({
		url: '/admin-api/promotion/seckill-config/update-status',
		method: 'put',
		data: params
	})
export const seckillCDelete = params =>
	request({
		url: '/admin-api/promotion/seckill-config/delete',
		method: 'delete',
		params: params
	})
export const seckillAll = params =>
	request({
		url: '/admin-api/promotion/seckill-config/list-all-simple',
		method: 'get',
		params: params
	})

///admin-api/promotion/seckill-activity/create
export const seckillcreate = params =>
	request({
		url: '/admin-api/promotion/seckill-activity/create',
		method: 'post',
		data: params
	})

export const seckillupdate = params =>
	request({
		url: '/admin-api/promotion/seckill-activity/update',
		method: 'put',
		data: params
	})

export const seckillget = params =>
	request({
		url: '/admin-api/promotion/seckill-activity/get',
		method: 'get',
		params: params
	})

///admin-api/doctor/crash/page
export const crashpage = params =>
	request({
		url: '/admin-api/doctor/crash/page',
		method: 'post',
		data: params
	})

export const menuCreate = params =>
  request({
    url: '/admin-api/system/menu/create',
    method: 'post',
    data: params
  })
export const menulist = params =>
  request({
    url: '/admin-api/system/menu/list',
    method: 'get',
    params: params
  })
export const menuget = params =>
  request({
    url: '/admin-api/system/menu/get',
    method: 'get',
    params: params
  })

///admin-api/order/after-sale/get-detail
export const saledetail = params =>
  request({
    url: '/admin-api/order/after-sale/get-detail',
    method: 'get',
    params: params
  })

///admin-api/order/after-sale/agree
export const saleagree = params =>
  request({
    url: '/admin-api/order/after-sale/agree',
    method: 'put',
    params: params
  })
export const saledisagree= params =>
  request({
    url: '/admin-api/order/after-sale/disagree',
    method: 'put',
    params: params
  })

export const salerefund= params =>
  request({
    url: '/admin-api/order/after-sale/refund',
    method: 'put',
    body: params
  })
  
  export const dictget= params =>
    request({
      url: '/admin-api/system/dict-type/get',
      method: 'get',
      params: params
    })